import {
  defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'

const baseURL = 'https://fetv.fzditian.com/fetv-api'
// const baseURL = 'https://www.fetv.cn/fetv-api'
const baseURL1 = 'http://192.168.110.147:8088'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    // 设置代理
    proxy: {
      "/api": {
        target: baseURL,
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '') // 重写路径把路径变成空字符
      }
    },
    
   
  },
  "compilerOptions": {
    "allowJs": true,
    },
  define: {
      'process.env': {}
    }
})
